package com.jboost.modules.message.handle.impl;

import com.jboost.modules.message.handle.ISendMsgHandle;
import com.jboost.modules.message.service.JPushService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j
@Service
@AllArgsConstructor
public class AppSendMsgHandle implements ISendMsgHandle {

	private final JPushService jPushService;

	@Override
	public void SendMsg(Object... params) {
		// TODO Auto-generated method stub
		String es_receiver = (String) params[0];
		String es_title = (String) params[1];
		String es_content = (String) params[2];
		Map<String, String> extrasMap = (Map<String, String>) params[3];
		Object alias = params[4];
		jPushService.sendPush(es_receiver,es_title,es_content,extrasMap, (String) alias);
		log.info("发微信消息模板");
	}

}
